<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../js/documentMyReady.js"></script>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ul>
    <script>
        'use strict';
        document.myReady(function(){
            //必须在document ready 在浏览器渲染样式前加上
            var node = document.createElement('link');
            node.setAttribute('rel','stylesheet');
            node.setAttribute('href','style.css');
            var headDom = document.getElementsByTagName('head')[0];
            headDom.appendChild(node);
        });
    </script>
</body>
</html>